<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">  
<title>专利协同服务网络平台</title>
<link href="${pageContext.request.contextPath}/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery/jquery.min.js"></script>
<style type="text/css">
.errorMsg{
	color: red;
	margin-left: 90px;
}
</style>
</head>
<body>
	<div class="place">
    	<span>位置：</span>
	    <ul class="placeul">
		    <li><a href="#">首页</a></li>
		    <li><a href="#">信息管理</a></li>
		    <li><a href="#">科研人员</a></li>
		    <li><a href="#">修改科研人员信息</a></li>
	    </ul>
    </div>
    <div class="formbody">
	    <div class="formtitle"><span>修改科研人员信息</span></div>
	    <form:form  modelAttribute="researcher"  action="${pageContext.request.contextPath}/rootAdmin/updateResearcher.do"  method="post" id="updateForm">
		    <input type="hidden" name="id" value="${researcher.id}"/>
		    <ul class="forminfo">
			    <li>
			    	<label>姓名</label><input name="userName" type="text" class="dfinput" value="${researcher.userName}"/>
			    </li>
			    <li><form:errors path="userName"  cssClass="errorMsg"  /></li>
			    <li>
			    	<label>单位</label>
			    	<cite>
			    		<c:forEach items="${dicSchools}" var="dicSchool">
			    			<c:choose>
			    				<c:when test="${dicSchool.typeCode == researcher.schoolType}">
			    					&nbsp;&nbsp;${dicSchool.description}
			    					<input name="schoolType" type="radio" checked="checked" value="${dicSchool.typeCode}" />	
			    				</c:when>
			    				<c:when test="${dicSchool.typeCode != researcher.schoolType}">
			    					 &nbsp;&nbsp;${dicSchool.description}
			    					<input name="schoolType" type="radio" value="${dicSchool.typeCode}" />
			    				</c:when>
			    			</c:choose>
			    		</c:forEach>
			    	</cite>
			    </li>
			    <li><form:errors path="schoolType"  cssClass="errorMsg"  /></li>
			    <li>
			    	<label>部门</label><input name="department" type="text" class="dfinput" value="${researcher.department}" />
			    </li>
			    <li><form:errors path="department"  cssClass="errorMsg"/></li>
			    <li>
			    	<label>手机号</label>
			    	<input name="phoneNumber" type="text" class="dfinput"  value="${researcher.phoneNumber}" />
			    </li>
			    <li><form:errors path="phoneNumber"  cssClass="errorMsg"/></li>
			    <li><span class="errorMsg">${phoneError}</span></li>
			    <li>
			    	<label>登录密码</label>
			    	<input name="password" type="text" class="dfinput"  value="${researcher.password}" />
			    </li>
			    <li><form:errors path="password"  cssClass="errorMsg"/></li>
			    <li>
			    	<label>研究方向</label>
			    	<input name="research" type="text" class="dfinput"  value="${researcher.research}" />
			    </li>
			    <li><form:errors path="research"  cssClass="errorMsg"/></li>
			    <li>
			    	<label>邮箱</label>
			    	<input name="email" type="text" class="dfinput"  value="${researcher.email}" />
			    </li>
			    <li><form:errors path="email"  cssClass="errorMsg"/></li>
			    <li>
			    	<label>QQ</label>
			    	<input name="QQ" type="text" class="dfinput"  value="${researcher.QQ}" />
			    	<i>非必填项</i>
			    </li>
			    <li>
			    	<label>微信</label>
			    	<input name="weChat" type="text" class="dfinput" value="${researcher.weChat}"  />
			    	<i>非必填项</i>
			    </li>
			    <li><label>&nbsp;</label><input   style="width:100px;" type="submit"  class="btn" value="提交"/></li>
		    </ul>	
    	</form:form>
    </div>
</body>
</html>